<div id="customer-manage-edit-view">
  <div class="pageheader">
    <h2><i class="fa fa-home"></i>用户信息</h2>
    <!--<div class="al-header-right">-->
    <!--<button type="button" class="btn btn-primary" ng-click="saveSetting()">保存</button>-->
    <!--<button type="button" class="btn btn-default" ng-click="resetAuthority()">重置</button>-->
    <!--</div>-->
  </div>
  <div class="page">
    <div class="al-list-container">
      <form name="modalForm" class="form-horizontal al-search-container" role="form">
        <div class="form-group">
          <label class="col-sm-4 control-label">账号<span class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.username" type="text"
                   ng-required="true" name="roleName" ng-disabled="type!='new'"
                   placeholder="" maxlength="50"/>
            <div class="help-block with-errors"
                 ng-if="modalForm.roleName.$invalid && !modalForm.roleName.$pristine">
              账号不可为空
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-4 control-label">密码<span ng-if="type=='new'" class="attr-need">*</span></label>
          <div class="col-sm-8">
            <input class="form-control" ng-model="data.password"
                   ng-required="type=='new'" name="password" type="password" ng-pattern="/[0-9|A-Z|a-z]{6,16}/"
                   placeholder="" maxlength="50">
            <div class="help-block with-errors"
                 ng-if="modalForm.password.$invalid && !modalForm.password.$pristine">
              创建用户密码必须为6-12位字母或数字
            </div>
          </div>
        </div>
        <div class="form-group">
          <label class="col-sm-4 control-label">状态</label>
          <div class="col-sm-8">
            <nobr>
              <label class="ui-radio" ng-repeat="option in enabledList">
                <input name="enabled" ng-value="option.value" type="radio" ng-model="data.enabled">
                <span>{{option.name}}</span>
              </label>
            </nobr>
          </div>
        </div>
        <div class="form-group">
          <div class="col-sm-3"></div>
          <div class="col-sm-3">
            <button class="al-center btn btn-default" ng-click="cancel()">取消</button>
          </div>
          <div class="col-sm-3">
            <button class="al-center btn btn-primary" ng-disabled="modalForm.$invalid" ng-click="confirm()">保存</button>
          </div>
          <div class="col-sm-3"></div>
        </div>
      </form>
    </div>
  </div>
</div>
